package goencoding

import "encoding/base64"

// Base64EncodeToString base64编码
func Base64EncodeToString(src string) string {
	return base64.StdEncoding.EncodeToString([]byte(src))
}

// Base64DecodeToString base64解码
func Base64DecodeToString(dst string) (string, error) {
	decodeString, err := base64.StdEncoding.DecodeString(dst)
	if err != nil {
		return "", err
	}
	return string(decodeString), nil
}
